//
//  MSAttendanceScreenCell.m
//  觅尚
//
//  Created by No.8 on 2019/4/10.
//  Copyright © 2019 No.8. All rights reserved.
//

#import "MSAttendanceScreenCell.h"

@implementation MSAttendanceScreenCell
- (id)initWithFrame:(CGRect)frame {
    self = [super initWithFrame:frame];
    if (self) {
        [self CreatView];
    }
    return self;
}
- (void)CreatView{
    
    
        /** 背景*/
        self.backView = [[UIView alloc] init];
        self.backView.frame = CGRectMake(100 * px, 0, 280 , 400);
        self.backView.layer.cornerRadius = 30 * px;
        self.backView.layer.masksToBounds = YES;
        self.backView.backgroundColor = [UIColor whiteColor];
        [self addSubview:self.backView];
    
        /** 头像*/
        self.PhotoIMG = [[UIImageView alloc] init];
        self.PhotoIMG.frame = CGRectMake(0, 0, self.backView.width, 500 * px);
        self.PhotoIMG.backgroundColor = [UIColor grayColor];
        [self.backView addSubview:self.PhotoIMG];



        /** 姓名*/
        self.NameLable = [[UILabel alloc] init];
        self.NameLable.frame = CGRectMake(20 * px, CGRectGetMaxY(self.PhotoIMG.frame) + 20 * px, 150 * px, 60 * px);
        self.NameLable.textColor = [UIColor blackColor];
        self.NameLable.text = @"柳林东";
        self.NameLable.textAlignment = NSTextAlignmentLeft;
        self.NameLable.font = [UIFont systemFontOfSize:SYRealValue(28 / 2)];
        [self.backView addSubview:self.NameLable];
        /** 姓名*/
        self.departmentLabel = [[UILabel alloc] init];
        self.departmentLabel.frame = CGRectMake(CGRectGetMaxX(self.NameLable.frame) + 10 * px, self.NameLable.y, self.NameLable.width, self.NameLable.height);
        self.departmentLabel.textColor = [UIColor grayColor];
        self.departmentLabel.text = @"(营业部)";
        self.departmentLabel.textAlignment = NSTextAlignmentLeft;
        self.departmentLabel.font = [UIFont systemFontOfSize:SYRealValue(26 / 2)];
        [self.backView addSubview:self.departmentLabel];

        /** 按钮*/
        self.SexButton = [[MSSexButton alloc] init];
        self.SexButton.frame = CGRectMake(self.NameLable.x, CGRectGetMaxY(self.NameLable.frame) + 20 * px, 100 * px, 40 * px);
        [self.SexButton  setImage:[UIImage imageNamed:@"女"] forState:UIControlStateNormal];
        [self.SexButton setTitle:@"23" forState:UIControlStateNormal];
        self.SexButton.backgroundColor = WYCRGBColor(239, 138, 139);
        self.SexButton.titleLabel.font = [UIFont systemFontOfSize:SYRealValue(20 / 2)];
        [self.SexButton  setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
        self.SexButton.layer.cornerRadius = 5 * px;
        [self.backView addSubview:self.SexButton];

        /** 身高*/
        self.heightLabel = [[UILabel alloc] init];
        self.heightLabel.frame = CGRectMake(CGRectGetMaxX(self.SexButton.frame) + 10 * px, self.SexButton.y, 100 * px, self.SexButton.height);
        self.heightLabel.textColor = self.SexButton.titleLabel.textColor;
        self.heightLabel.text = @"165cm";
        self.heightLabel.layer.cornerRadius = 5 * px;
        self.heightLabel.backgroundColor = WYCRGBColor(109, 128, 152);
        self.heightLabel.textAlignment = NSTextAlignmentCenter;
        self.heightLabel.font = [UIFont systemFontOfSize:SYRealValue(20 / 2)];
        [self.backView addSubview:self.heightLabel];

        /** 身高*/
        self.addressLabel = [[UILabel alloc] init];
        self.addressLabel.frame = CGRectMake(CGRectGetMaxX(self.heightLabel.frame) + 10 * px, self.SexButton.y, 150 * px, self.SexButton.height);
        self.addressLabel.textColor = [UIColor whiteColor];
        self.addressLabel.text = @"中国河北";
        self.addressLabel.layer.cornerRadius = 5 * px;
        self.addressLabel.backgroundColor = WYCRGBColor(109, 128, 152);
        self.addressLabel.textAlignment = NSTextAlignmentCenter;
        self.addressLabel.font = [UIFont systemFontOfSize:SYRealValue(20 / 2)];
        [self.backView addSubview:self.addressLabel];
    
}


@end
